
_init:

;Lcd.c,37 :: 		void init() {
;Lcd.c,38 :: 		ANSEL  = 0;                                // Configure AN pins as digital I/O
	CLRF       ANSEL+0
;Lcd.c,39 :: 		ANSELH = 0;
	CLRF       ANSELH+0
;Lcd.c,40 :: 		C1ON_bit = 0;                              // Disable comparators
	BCF        C1ON_bit+0, 7
;Lcd.c,41 :: 		C2ON_bit = 0;
	BCF        C2ON_bit+0, 7
;Lcd.c,43 :: 		ADC_Init();
	CALL       _ADC_Init+0
;Lcd.c,45 :: 		Lcd_Init();                                // Initialize LCD
	CALL       _Lcd_Init+0
;Lcd.c,46 :: 		Lcd_Cmd(_LCD_CLEAR);                       // Clear display
	MOVLW      1
	MOVWF      FARG_Lcd_Cmd_out_char+0
	CALL       _Lcd_Cmd+0
;Lcd.c,47 :: 		Lcd_Cmd(_LCD_CURSOR_OFF);                  // Cursor off
	MOVLW      12
	MOVWF      FARG_Lcd_Cmd_out_char+0
	CALL       _Lcd_Cmd+0
;Lcd.c,48 :: 		}
	RETURN
; end of _init

_main:

;Lcd.c,50 :: 		void main(){
;Lcd.c,51 :: 		init();
	CALL       _init+0
;Lcd.c,52 :: 		Lcd_Out(1,1,text);
	MOVLW      1
	MOVWF      FARG_Lcd_Out_row+0
	MOVLW      1
	MOVWF      FARG_Lcd_Out_column+0
	MOVF       _text+0, 0
	MOVWF      FARG_Lcd_Out_text+0
	CALL       _Lcd_Out+0
;Lcd.c,53 :: 		while(1) {                                 // Endless loop
L_main0:
;Lcd.c,54 :: 		potentiometer_value = ADC_Read(2);       // Get 10-bit results of AD conversion
	MOVLW      2
	MOVWF      FARG_ADC_Read_channel+0
	CALL       _ADC_Read+0
	MOVF       R0+0, 0
	MOVWF      _potentiometer_value+0
	MOVF       R0+1, 0
	MOVWF      _potentiometer_value+1
	CLRF       _potentiometer_value+2
	CLRF       _potentiometer_value+3
;Lcd.c,55 :: 		LongToStr(potentiometer_value,text);     // Convert Unsigned Int to Str
	MOVF       _potentiometer_value+0, 0
	MOVWF      FARG_LongToStr_input+0
	MOVF       _potentiometer_value+1, 0
	MOVWF      FARG_LongToStr_input+1
	MOVF       _potentiometer_value+2, 0
	MOVWF      FARG_LongToStr_input+2
	MOVF       _potentiometer_value+3, 0
	MOVWF      FARG_LongToStr_input+3
	MOVF       _text+0, 0
	MOVWF      FARG_LongToStr_output+0
	CALL       _LongToStr+0
;Lcd.c,56 :: 		Lcd_Out(2,1,text);                       // Write text in first row
	MOVLW      2
	MOVWF      FARG_Lcd_Out_row+0
	MOVLW      1
	MOVWF      FARG_Lcd_Out_column+0
	MOVF       _text+0, 0
	MOVWF      FARG_Lcd_Out_text+0
	CALL       _Lcd_Out+0
;Lcd.c,57 :: 		}
	GOTO       L_main0
;Lcd.c,58 :: 		}
	GOTO       $+0
; end of _main
